{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/design-hashset\n",
    "\n",
    "\n",
    "Runtime: 96 ms, faster than 34.92% of Go online submissions for Design HashSet.\n",
    "Memory Usage: 7.3 MB, less than 100.00% of Go online submissions for Design HashSet.\n",
    "\n",
    "\n",
    "```go\n",
    "package main\n",
    "\n",
    "type MyHashSet struct {\n",
    "\tset map[int]bool\n",
    "}\n",
    "\n",
    "func Constructor() MyHashSet {\n",
    "\treturn MyHashSet{\n",
    "\t\tmake(map[int]bool),\n",
    "\t}\n",
    "}\n",
    "\n",
    "func (this *MyHashSet) Add(key int) {\n",
    "\tthis.set[key] = true\n",
    "}\n",
    "\n",
    "func (this *MyHashSet) Remove(key int) {\n",
    "\tdelete(this.set, key)\n",
    "}\n",
    "\n",
    "func (this *MyHashSet) Contains(key int) bool {\n",
    "\t_, exists := this.set[key]\n",
    "\treturn exists\n",
    "}\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Go",
   "language": "go",
   "name": "gophernotes"
  },
  "language_info": {
   "codemirror_mode": "",
   "file_extension": ".go",
   "mimetype": "",
   "name": "go",
   "nbconvert_exporter": "",
   "pygments_lexer": "",
   "version": "go1.15.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
